import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'home',
      component: HomeView,
      children: [
        {
          path:'main',
          name:'Main',
          component: () => import('@/views/MainView.vue')
        }
      ]
    },
    {
      path:'/system',
      name:'System',
      component: () => import('@/views/SystemView.vue'),
      children: [
        {
          path: 'admin',
          name: 'Admin',
          component: () => import('@/views/AdminView.vue')
        }
      ]
    },
    {
      path: '/login',
      name: 'Login',
      component: () => import('@/views/LoginView.vue')
    }
    
  ],
})

export default router
